/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.tnmk.common.util;

import java.awt.Image;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.imageio.ImageIO;
import org.tnmk.worktime.gui.MainFrame;

/**
 *
 * @author Administrator
 */
public class ImageUtils {

  public static Image loadFromClassPath(String path) {
    Image rs = null;
    try {
      rs = ImageIO.read(ClassLoader.getSystemResource(path));
    } catch (IOException ex) {
      Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, null, ex);
    }
    return rs;
  }
}
